'use strict';

const Controller = require('egg').Controller;

class projectController extends Controller {
    /* 项目接单及子页面 -------------------------------------------------------------- */
    async project(){
        const page = this.ctx.query.page || 1;
        var memberList = await this.ctx.service.banner.bannerList('vip_area');
        var list = await this.ctx.service.project.list(page,15);
        var data = {
            memberList:memberList,
            list:list,
        };
        await this.ctx.render('page/project/project.html',{data:data});
    }
    async project_rule(){
        await this.ctx.render('page/project/project_rule.html');
    }
    async project_rule_common(){
        await this.ctx.render('page/project/project_rule_common.html');
    }
    async project_content(){
        const id = this.ctx.params.id || '';
        var content = await this.ctx.service.project.listContent(id);
        await this.ctx.render('page/project/project_content.html',{data:content});
    }
    async project_content_user(){
        const id = this.ctx.params.id || '';
        var content = await this.ctx.service.project.listContent(id);
        await this.ctx.render('page/project/project_content_user.html',{data:content});
    }


}

module.exports = projectController;

